<template>
  <div>
      <van-nav-bar
        title="消息"
        :fixed="true"
      />
      <van-notice-bar
        text="让你加微信、QQ或者链接、扫二维码的都是骗子"
        left-icon="volume-o"
        class="tz"
      />
      <van-cell-group>
        <van-cell
          v-for="item in box"
          :title="item.title"
          :value="item.value"
          :label="item.label"
          :to="item.to"
        >
          <van-image
            round
            width="1rem"
            height="1rem"
            :src="item.img"
            slot='icon'
          />
        </van-cell>
      </van-cell-group>

  </div>
</template>

<script>
  export default {
    name:'Message',
    data(){
      return {
        active:3,
        box:[
          {
            title:'订单消息',
            value:'',
            label:'最新消息',
            img:'../../static/img/1.png',
            to:'/Dingdan'
          },
          {
            title:'活动消息',
            value:'',
            label:'最新消息',
            img:'../../static/img/2.png',
            to:'/Play'
          },
          {
            title:'通知',
            value:'',
            label:'暂无最新通知',
            img:'../../static/img/3.png',
            to:'/Tongzhi'
          },
          {
            title:'留言',
            value:'',
            label:'暂无最新留言',
            img:'../../static/img/4.png',
            to:'/Liuyan'
          },
          {
            title:'私信',
            value:'',
            label:'暂无最新消息',
            img:'../../static/img/5.png',
            to:'/Sixin'
          }
        ]
      }
    },
    mounted(){
      this.$emit('getMsg',{active:this.active})
    }
  }
</script>

<style>
.tz{
  margin-top: 45px;
  color: pink;
}
.van-cell__title{
  text-align: left;
  margin-left: 10px;
}
</style>
